<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <#include "include/_meta.html">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 还车管理 <span class="c-gray en">&gt;</span> 还车列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div  id="app" class="page-container">
    <div class="text-c">
        订单编号：<input type="text" class="input-text" style="width:250px" placeholder="输入订单编号" id="orderid" name="orderid">
        客户手机：<input type="text" class="input-text" style="width:250px" placeholder="输入客户手机" id="mobile" name="mobile">
        <input type="hidden" style="width:250px" id="realettime" name="realettime" value="${(info.realettime)!''}">
        <button type="submit" class="btn btn-success" id="searchOrders" name="searchOrders "> 查询订单</button>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> </span> <span class="r">共有数据：<strong id="pageTotal"></strong></span> </div>
    <table id="orderListTable" class="table table-border table-bordered table-bg table-hover">
        <thead>
        <tr>
            <th scope="col" colspan="9">订单列表</th>
        </tr>
        <tr class="success">
            <th >订单号</th>
            <th >客户手机</th>
            <th >客户姓名</th>
            <th >车辆型号</th>
            <th >车牌号</th>
            <th >车牌颜色</th>
            <th >租车日期</th>
            <th >还车日期</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
        <tr class="active" v-for="item in info.list">
            <td>{{item.orderid}}</td>
            <td>{{item.mobile}}</td>
            <td>{{item.name}}</td>
            <td>{{item.carbrandtype}}</td>
            <td>{{item.carcode}}</td>
            <td>{{item.carcolor}}</td>
            <td>{{item.realbttime}}</td>
            <td>{{item.realettime}}</td>
            <td>
                <a href="#" @click="adminedit(item.orderid)">我要还车</a>
                <a href="#" @click="adminedittwo(item.orderid)">审核</a>
            </td>
        </tr>
        </tbody>
        <tr>
            <td colspan="3">
                <div id="pagenav"></div>
            </td>
        </tr>
    </table>
</div>

<#include "include/_footer.html">


<script type="text/javascript">
    var app=new Vue({
        el:'#app',
        data:{
            info:{}
        }
    });

    var getOrderList = function (curr) {
        $.ajax({
            url:"/getPage",
            data:{
                pageSize:8,
                curr:curr || 1,
                orderid:$("#orderid").val(),
                mobile:$("#mobile").val()
            },
            dataType:"json",
            type:"GET",
            success:function (info) {
                app.info=info;
                laypage({
                    cont:"pagenav",
                    pages:info.pages,
                    skin:"#DB7023",
                    first:"首页",
                    last:"最后一页",
                    curr:curr || 1,
                    jump:function (obj,first) {
                        if (!first){
                            getOrderList(obj.curr);
                        }
                    }

                });
            }
        });
    }
    getOrderList();

    
    $("#searchOrders").click(function () {
        $("#orderListTable").dataTable().fnClearTable();
        getOrderList();
    });

var adminedit =  function (orderid) {
    layer.open({
        type:2,
        title:"我要还车",
        fix:false,
        maxmin:true,
        shadeClose:true,
        area:['1000px','600px'],
        content:"/editPagee?orderid"+orderid,
        end:function () {
            getOrderList();
        }
    });
}

    var adminedittwo =  function (orderid) {
        layer.open({
            type:2,
            title:"审核",
            fix:false,
            maxmin:true,
            shadeClose:true,
            area:['1000px','600px'],
            content:"/editPagee?orderid"+orderid,
            end:function () {
                getOrderList();
            }
        });
    }




</script>
</body>
    
    